home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2007 December / PCWKCD1207B.iso / Windows marzen / Macro ToolsWorks 6.31 / tworks.exe / Samples / Insert time & date in Notepad.mcr < prev    next >
Encoding:
Text File  |  2003-06-12  |  655 b   |  18 lines

  1. <#> 
  2. <#> Sample: Start Notepad and insert time & date
  3. <#> 
  4. <cmds>
  5. <#> Start Notepad and make it active window
  6. <execappex>("notepad.exe","","",0,0)
  7. <waitfor>("WIN","OPEN","mw[[  ]] mc[[ Notepad ]] cw[[  ]] cc[[  ]] ",5,0)
  8. <actwin>("mw[[  ]] mc[[ Notepad ]] cw[[  ]] cc[[  ]] ",0,0,"no")
  9. <if_win>("mw[[  ]] mc[[ Notepad ]] cw[[  ]] cc[[  ]] ","ACT",0)
  10.  
  11. <#> Insert time & date here:
  12. <keys>Current time:<time>(0,1,1,1,1)
  13. Current date: <date>(9,"/",1,1,0)
  14.  
  15. Current date formatted a diferent way using a variable and system variables: <cmds>
  16. <varset>("vDate=<%_vCurrDate_DD%><%_vCurrDate_MM%><%_vCurrDate_Year%>","")
  17. <varout>("vDate",0)
  18. <endif>